package de.tum.icuproject;

import de.tum.icuproject.model.Player;
import de.tum.icuproject.model.Session;

/**
 * Follows the Publisher-Subscriber style for asynchronous notifications
 * @author stefanoturchetta
 *
 */
public interface Subscriber {
	
	/**
	 * Gets the current player
	 */
	public Player getCurrentPlayer();
	
	/**
	 * Sets the current player
	 * @param player
	 */
	public void setCurrentPlayer(Player player);
	
	/**
	 * Sets the current game session
	 * @param session
	 */
	public void setCurrentSession(Session session);
	
	/**
	 * Sets the generated player id
	 * @param playerId
	 */
	public void setPlayerId(int playerId);
	
	/**
	 * Sets the generated session id
	 * @param sessionId
	 */
	public void setSessionId(int sessionId);
	
	/**
	 * Confirms an insertion into the database
	 * @param confirm	true if successful, false otherwise
	 */
	public void confirmInsertion(boolean confirm);
	
	/**
	 * Confirms an update into the database
	 * @param confirm	true if successful, false otherwise
	 */
	public void confirmUpdate(boolean confirm);
	
	/**
	 * Confirms a deletion into the database
	 * @param confirm	true if successful, false otherwise
	 */
	public void confirmDeletion(boolean confirm);	

}
